package com.nkzy.controller;

import com.nkzy.domain.dto.UserFormDTO;
import com.nkzy.domain.pojo.User;
import com.nkzy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/users") //RestFul风格要求请求路径用表名+s
@RestController
public class UserController {
    //Controller是前后端数据交互的桥梁，对于后端开发人员来说：给前端开发人员提供接口说明文档
    @Autowired
    private UserService userService;
    //保存数据
    public void saveUser(@RequestBody UserFormDTO userFormDTO){
        //1.把DTO转换为POJO对象
    }
}
